Carbon


DirCreate

Header: Files.h Carbon status: Supported

Creates a new directory.

OSErr DirCreate (
    SInt16 vRefNum, 
    SInt32 parentDirID, 
    ConstStr255Param directoryName, 
    SInt32 *createdDirID
);
vRefNum

A volume reference number, a working directory reference number, or 0 for the default volume.

parentDirID

The directory ID of the parent directory; if it’s 0, the new directory is placed in the root directory of the specified volume.

directoryName

The name of the new directory.

createdDirID

On return, a pointer to the directory ID of the created directory.

function result

A result code.

DISCUSSION

The date and time of the new directory’s creation and last modification are set to the current date and time.

A directory ID, unlike a volume reference number or a working directory reference number, is a SInt32 value.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)